#pragma once
#include "stdafx.h"
#include "PreHeader.h"
#include "Timer.h"


using namespace boost::chrono;

class Timer;

class Animation
{
public:
	typedef boost::shared_ptr<Animation> sPtr;
	typedef system_clock::time_point SystemTime;
	
	enum InterpolationMode
	{
		LINER_INTERPOLATION
	};
	
private:
	Animation() {}
	
public:
	Animation(Anims*,InterpolationMode);
	~Animation();
	bool CalcAnim(const int, Bones*);
	void ChangeAnim(const string&);
	void SetSpeed(const float);

private:
	void Interpolation(const Bones* , const Bones*, float ,Bones*);
	void LinerInterpolation(const Bones*, const Bones*, float, Bones*);
	
private:
	int m_activateKeyFrame;
	AnimStr* m_activateAnim;
	Anims* m_anims;
	int m_totalTime;
	int m_preFrameTime;
	int m_currentTime;
	float m_speed;
	InterpolationMode m_interMode;
};